package com.ehome.poct.core.pasre.report.symbol;

import com.ehome.poct.base.api.enums.StripTypeEnums;
import com.ehome.poct.core.api.dto.check.gold.TestConfPoctStripTypeDTO;
import com.ehome.poct.core.pasre.report.symbol.dto.ReportSymbolDTO;

import java.math.BigDecimal;

/**
 * @auther: kuiba.peng
 * @date: 2022/11/10 14:26
 * @description:
 */
public class MALBSymbolStrategy implements SymbolStrategy {
    @Override
    public StripTypeEnums getStripType() {
        return StripTypeEnums.MALB;
    }

    @Override
    public String getSymbol(ReportSymbolDTO reportSymbolDTO) {
        TestConfPoctStripTypeDTO confPoctStripType = reportSymbolDTO.getConfPoctStripType();
        BigDecimal stand = new BigDecimal(confPoctStripType.getReference().replace("<", ""));
        if (reportSymbolDTO.getCheckResult().compareTo(stand) >= 0) {
            return "↑";
        }
        return "";
    }
}
